<?php
include(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'bootstrap.php');

$view = new View;
if (isset($_SESSION['login'])) {
    $view->setTemplate('index.tpl.php');
    $view->login     = $_SESSION['login'];
    $view->full_name = $_SESSION['full_name'];
} else {
    $view->setTemplate('unauthorized.tpl.php');
    $view->login_fail = isset($_GET['login_fail']);
}
$view->render();
